<script type="text/javascript" >
$(document).ready(function(){
	$("#tgl_awal").datepicker({
		dateFormat: 'yy-mm-dd'
	});
	$("#tgl_akhir").datepicker({
		dateFormat: 'yy-mm-dd'
	});
	$(".link_detail").fancybox({
		'overlayShow'	: false,
		'transitionIn'	: 'elastic',
		'transitionOut'	: 'elastic'
	});
});
</script>
<div id="tiga_ba">
	<div id="tiga_baa">Setting Verifikasi Awal</div>
	
	<div class="clear"></div>
</div>
<?php
require_once 'config/fungsi_laporan.php';

	$bulan=date('m');
	$tahun=date('Y');
	$jumHari = cal_days_in_month(CAL_GREGORIAN, $bulan, $tahun);
	
	
	
	if(isset($_POST['submit'])){
		$tgl_awal=$_POST['tgl_awal'];
		$tgl_akhir=$_POST['tgl_akhir'];
		$nama_ppk=$_POST['nama_ppk'];	
		$jenis_klaim=$_POST['jenis_klaim'];
		$jml=$_POST['jml'];
		$_SESSION['set_awal']=true;
		$_SESSION['tgl_awal']=$tgl_awal;
		$_SESSION['tgl_akhir']=$tgl_akhir;
		$_SESSION['nama_ppk']=$nama_ppk;
		$_SESSION['jenis_klaim']=$jenis_klaim;
		$_SESSION['jml']=$jml;
	}else{
		$tgl_awal=$_SESSION['tgl_awal'];
		$tgl_akhir=$_SESSION['tgl_akhir'];
		$nama_ppk=$_SESSION['nama_ppk'];	
		$jenis_klaim=$_SESSION['jenis_klaim'];
		$jml=$_SESSION['jml'];
	}
	
	if(empty($_SESSION['tgl_awal'])){
		$tgl_awal=$tahun."-".$bulan."-01";
	}
	
	if(empty($_SESSION['tgl_akhir'])){
		$tgl_akhir=$tahun."-".$bulan."-".$jumHari;
	}
	
	
?>
<form method=post action='utama.php?module=mod_verifikasi_awal'>
	<table style="margin-left: 5px;" width="780" >
		<tr>
			<td width="65">Tgl Awal  : </td>
			<td width="200"><input type="text" name="tgl_awal" id="tgl_awal" value="<?php echo $tgl_awal; ?>" class="input_field" /></td>
			<td></td>
		</tr>
		<tr>
			<td width="65">Tgl Akhir  : </td>
			<td width="200"><input type="text" name="tgl_akhir" id="tgl_akhir" value="<?php echo $tgl_akhir; ?>" class="input_field" /></td>
			
		</tr>
		<tr>
			<td width="65">PPK  : </td>
			<td width="200"><?php edit_kombo_baru("ppk","nama_ppk","input_field","id_ppk","nama",$nama_ppk)?></td>
		
		</tr>
		<tr>
			<td width="65">Jenis : </td>
			<td width="200"><?php 
			$arr_jenis=array('service'=>'Fee For Service','inacbg'=>'Ina CBG');
			kombo_from_array("jenis_klaim","input_field",$arr_jenis,$jenis_klaim);?></td>
		
		</tr>
		<tr>
			<td width="65"></td>
			<td><input name="submit" type="submit" class="button" value="Setting" /></td>
		</tr>
	</table>
</form>